<%@page import="com.qdu.entity.Log"%>
<%@page import="java.util.List"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
        <title>发表日志</title>
        <script>
            $("#bold").click(function(){
                $("#text").css("font-weight","bold");
            });
        </script>
    </head>
    <body>
        <!--最上面图片和搜索框-->
        <div style="background-image: url(images/${requestScope.activity.getAcover()});background-size: 100% 100%;width: 1100px;height: 400px;margin-left: 70px">
            
            <div style="opacity: 0.3;background-color: #000;width: auto;height: 80px;position: absolute; left: 70px;top:140px">
                <h1 style="color: white; align-content: center;font-size: 40px;font-weight: bold">${requestScope.activity.getAname()}</h1>
            </div>
            <form action="psas" class="form-inline">
                <input type="text" name="name" placeholder="活动名称" style="margin-top: 330px;margin-left: 240px;width: 600px;height: 40px">
                <button class="btn btn-primary glyphicon glyphicon-search"></button>
            </form>
        </div>

        <!--左侧发表日志的框-->
        <div style="width: 800px;height: 500px;border-radius: 6px;margin-left: 70px;margin-bottom: 50px;margin-top: 5px;border: #adadad thin inset">
            <br>
            <!--输入区域，用来提交表单-->
            <form action="pols">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                <input type="text" class="hidden" value="${requestScope.activity.getActivityId()}" name="actId">
                <button type='button' class="glyphicon glyphicon-bold btn" style="margin: 0;padding: 0;position: absolute;top: 425px;" onclick="document.getElementById('text').style.fontWeight = 'bold'"></button>
                <button type='button' class="glyphicon glyphicon-italic" style="margin: 0;padding: 0;border: 0;position: absolute;top: 427px;margin-left: 30px" onclick="document.getElementById('text').style.fontStyle='italic'"></button>
                <button type='button' class="glyphicon glyphicon-text-width" style="margin: 0;padding: 0;border: 0;position: absolute;top: 427px;margin-left: 60px" onclick="document.getElementById('text').style.textDecoration='underline'"></button>
                <button type='button' class="glyphicon glyphicon-align-left" style="margin: 0;padding: 0;border: 0;position: absolute;top: 427px;margin-left: 90px" onclick="document.getElementById('text').style.textAlign='left'"></button>          
                <button type='button' class="glyphicon glyphicon-align-center" style="margin: 0;padding: 0;border: 0;position: absolute;top: 427px;margin-left: 120px" onclick="document.getElementById('text').style.textAlign='center'"></button>
                <button type='button' class="glyphicon glyphicon-align-right" style="margin: 0;padding: 0;border: 0;position: absolute;top: 427px;margin-left: 150px" onclick="document.getElementById('text').style.textAlign='right'"></button>
                <button type='button' name="imag" class="glyphicon glyphicon-picture btn" style="margin: 0;padding: 0;position: absolute;top: 425px;margin-left: 180px" onclick="document.getElementById('fileField').click()"></button>
                <input type="file" id="fileField" class="hidden file" size="28" name="image" onchange="document.getElementById('filefield').value=this.value" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <span class="glyphicon glyphicon-option-vertical"></span>
                <hr>
                <input name="title" type="text" style="width: 300px;height: 40px; margin-left: 240px" placeholder="请输入标题">
                <br>
                <textarea name="text" id="text" cols="95" rows="15" style="margin-left: 40px;" placeholder="输入日志内容"></textarea>
                <button class="btn btn-primary" style="margin-left: 670px;margin-top: 6px">发表日志</button>
            </form>
        </div>

        <!--右边显示所有日志的-->
        <div id="moreLog" style="height:auto;width: 290px;position: absolute;top: 406px;left: 880px;border-radius: 5px;background-color:#f7e1b5">
            <br><br>
            <p style="font-size: 20px">&nbsp;&nbsp;&nbsp;&nbsp;更多日志</p>
            <hr style=" width: 80%;border:none;border-top-width:2.2px;border-top-style:solid;border-top-color:#FFF;">
            <!--循环打印-->
            <%
                List<Log> list=(List<Log>) request.getAttribute("list");
                for(Log l:list){
            %>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <span class="glyphicon glyphicon-tag"></span>
                <a href="mainsols?id=<%=l.getId() %>" name="name" style="color: #101010"><%=l.getName() %></a>
                <hr style=" width: 80%;border:none;border-top-width:0.5px;border-top-style:solid;border-top-color:#FFF;">
            
           <%
                }
            %>
        </div>

    </body>
</html>
